package com.xbongbong.pro.statistic.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;

/**
 *字段使用场景
 * @author 梁鲁江
 * @version v1.0
 * @date 2019/1/23 13:47
 * @since v1.0
 */
public enum  FieldUseLocationEnum {
    /**
     * 字段使用场景
     */
    DISPLAYATTR(1,"displayAttr","enum.fieldUseLocation.msg.displayattr"),
    SUMATTR(2,"sumAttr","enum.fieldUseLocation.msg.sumattr"),
    GROUPATTR(3,"groupAttr","enum.fieldUseLocation.msg.groupattr"),
    ;
    /**
     * 枚举值
     */
    private final int code;
    /**
     * 英文描述
     */
    private final String alias;
    /**
     * 中文描述
     */
    private final String msg;

    FieldUseLocationEnum(int code, String alias, String msg) {
        this.code = code;
        this.alias = alias;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getAlias() {
        return alias;
    }

    public String getMsg() {
        return I18nMessageUtil.getMessage(msg);
    }
}
